package com.sc.highspeed.service;

import com.sc.highspeed.db.dao.MenuDao;
import com.sc.highspeed.db.model.MenuModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2017/12/6.
 */
@Service
public class MenuService {

    @Autowired
    private MenuDao menuDao;

    public List<MenuModel> getMenuList() {
        return menuDao.getMenuList();
    }

    public MenuModel getMenuById(int id) {
        return menuDao.getMenuById(id);
    }

    public int insertMenu(MenuModel menuModel) {
        return menuDao.insertMenu(menuModel);
    }

    public int updateMenuById(MenuModel menuModel) {
        return menuDao.updateMenuById(menuModel);
    }

    public int deleteMenuById(int id) {
        return menuDao.deleteMenuById(id);
    }
}
